<%@page contentType="text/html; charset=utf-8" language="java" errorPage="" %>
<%@page import="btsm.bean.page,java.sql.*"%>
<%!ResultSet rs;%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>基站地理环境管理</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<LINK href="Admin_Style.css" type=text/css rel=stylesheet>
</HEAD>
<%
    page mypage = new page("dictionary", "1");//更改
	 
	String strbsSign = request.getParameter("bsSign");
	String strSelect = request.getParameter("dictypesel");
	if(strSelect == null || strSelect.equals("null"))
		strSelect = "";
		
    String jspName = request.getRequestURI();
    jspName = jspName.substring(jspName.lastIndexOf("/") + 1);		
    String strToPage = request.getParameter("ToPage");		
	
	String strsnid = (String) request.getAttribute("snid");
	String strValues[] = new String[4];
	String idtmp;
	
%>
<BODY onLoad="defaultSet()" style="margin:2; overflow:hidden">
<script>
function defaultSet(){
	frmQuery.dictypesel.value="<%=strSelect%>";
}
</script>
<script>
function changeselect(selT){ 	
//   alert(selT.value);
}
</script>
<script>
	function btnRinsertS(){
		document.Jz_myform.seraction.value="serinsertsimple";
		document.Jz_myform.submit();
	}
	function btnModifyU(){
		document.Jz_myform.seraction.value="sermod";
		document.Jz_myform.submit();
	}
</script>
<SCRIPT>
    function tjsj(x){
        document.Jz_myform.snid.value=x;
		document.Jz_myform.seraction.value="serdel";
        if(confirm('确认要删除流水号为'+x+'的记录吗？'))
        	document.Jz_myform.submit();     
    }

    function tjsjx(x){
        document.Jz_myform.snid.value=x;
		document.Jz_myform.seraction.value="sermodp";
        document.Jz_myform.submit();
    }
</SCRIPT>
<script>
function tst(obj0,obj1,obj2){
obj0.style.border="1 "+obj1+" solid";
obj0.style.background=obj2;
}
</script>
<script>
function genQuery(){
	frmQuery.bsSign.value = "1";
    frmQuery.submit();
}
</script>
<TABLE class="border" cellSpacing=1 cellPadding=2 width="100%" border=0>
  <!--位置区域数据开始-->
  <TBODY>
  <FORM name="frmQuery" action="nnmd_dicmgr.jsp" method="post">
    <tr>
      <td colspan="6" align="center">字典类型&nbsp;&nbsp;
        <select size="1" name="dictypesel" onChange="changeselect(this);">
          <option value="01" selected="selected">基站位置区域</option>
          <option value="02">基站地形</option>
          <option value="03">机房结构</option>
          <option value="04">机房产权</option>
          <option value="05">围墙门类型</option>
          <option value="06">进入机房是否方便</option>
          <option value="07">有无机房警示牌</option>
          <option value="08">使用传输方式</option>
          <option value="09">固定式油机发电机组机型</option>
          <option value="10">道路状况</option>
          <option value="11">方向性</option>
          <option value="12">极化方式</option>
          <option value="13">使用频段</option>
          <option value="14">市电类型</option>
          <option value="15">铁塔产权</option>
          <option value="16">铁塔类型</option>
          <option value="17">维护方式</option>
          <option value="18">基站型号</option>
          <option value="19">主设备类型</option>
          <option value="21">主设备型号</option>
          <option value="22">传输方式</option>
          <option value="23">传输设备所有权</option>
        </select>
        &nbsp;&nbsp;&nbsp;
        <input type="hidden" name="bsSign" value="0">
        <input type="button" value=" 搜索 " name="btnQuery" style="width: 40; height: 20" class=tx_button onClick="genQuery()" onMouseOver="tst(this,'blue','#ffffff')" onMouseOut="tst(this,'black','#e8e7fe')">
      </td>
    </tr>
  </FORM>
  <TR>
    <!--位置区域名称表单开始-->
    <FORM name="frmDicmgr" action="dicMgr.jsp" method="post">
      <TD>
      <TBODY id=Tabs>
        <!--位置区域名称列表表头开始-->
      <TR class=title align=middle height=22>
          <TD align="center">流水号</TD>
          <TD align="center">类型</TD>
          <TD align="center">编号</TD>
          <TD align="center">名称</TD>
          <TD colspan="2"><p align="center">操作</p></TD>
        </TR>
        <!--位置区域名称列表表头结束-->
        <!--位置区域名称列表记录循环代码开始-->
        <% 
         if (strbsSign == null || strbsSign.equals("0") || strSelect == null || strSelect.equals("")) {
            rs = mypage.DicQuery(request,response,1,10);
        } else {
            rs = mypage.DicFQuery(request, response,1, 10, strSelect);
        }
		
        while(rs.next())
        {
%>
      <TR class=tdbg onMouseOver="this.className='tdbgmouseover'" onMouseOut="this.className='tdbg'" align=middle>
          <TD><%=rs.getString(1)%></TD>
          <TD><%=rs.getString(2)%></TD>
          <TD><%=rs.getString(3)%></TD>
          <TD><%=rs.getString(4)%></TD>
          <TD><a href="javascript:tjsjx('<%=rs.getString(1)%>')">修改</a></TD>
          <TD><a href="javascript:tjsj('<%=rs.getString(1)%>')">删除</a></TD>
        </TR>
        <%
	 		idtmp = rs.getString(1);
			if(strsnid == null)
	        {
    	        strsnid = rs.getString(1);
        	}
			if(strsnid.equalsIgnoreCase(idtmp))
			{
				for(int i = 0; i < 4; ++i)
				{
						strValues[i] = rs.getString(i+1);
				}
			}	
		}
        String footer = mypage.PageFooter();
%>
        <% 
	rs.close();
%>
        <!--位置区域名称列表记录循环代码结束-->
    </form>
  <TR class=tdbg onMouseOver="this.className='tdbgmouseover'" onMouseOut="this.className='tdbg'" align=middle>
    <TD width="883" colspan="6"><div class="article-bottom">
        <div class="pages">
          <%out.println(footer);%>
        </div>
      </div>
      <!--mainWrapper -->
      <div id="footer">
        <div id="innerFooter"></div>
      </div></TD>
    <!--位置区域名称表单结束-->
  </TR>
  </TBODY>
  
  <!--位置区域数据结束-->
  <TR>
    <TD colspan="6"><TABLE class=border cellSpacing=1 cellPadding=2 width="100%" align=center border=0>
        <FORM name="Jz_myform" action="ser_dicmgr" method="post">
          <!--更改-->
          <!--添加数据表单开始-->
          <TBODY id=Tabs>
            <TR class=tdbg>
              <TD class=tdbg5 height="26">流水号：</TD>
              <TD height="26"><%=strValues[0]%>
                <input type="hidden" name="T1" size="46" class=text2d value="<%=strValues[0]%>" maxlength="20" onBlur="checkQuote(this.value,this)">
              </TD>
              <TD class=tdbg5 colspan="2" height="26">字典类型：</TD>
              <TD height="26"><input type="text" name="T1" size="46" class=text2d value="<%=strValues[1]%>" maxlength="24" onBlur="checkQuote(this.value,this)"></TD>
            </TR>
            <tr class=tdbg>
              <TD class=tdbg5 height="26">编号：</TD>
              <TD height="26"><input type="text" name="T1" size="49" class=text2d value="<%=strValues[2]%>" maxlength="24" onBlur="checkQuote(this.value,this)">
              </TD>
              <TD class=tdbg5 colspan="2" height="26">名称：</TD>
              <TD height="26"><input type="text" name="T1" size="46" class=text2d value="<%=strValues[3]%>" maxlength="32" onBlur="checkQuote(this.value,this)">
              </TD>
            </tr>
            <TR class=tdbg>
              <TD class=tdbg5 height="51" colspan="5"><p align="center">
                  <input type="hidden" name="filesnames" value=<%=jspName%>>
                  <input type="hidden" name="seraction" value="sermod">
                  <input type="hidden" name="snid" id="snid" value="<%=strsnid%>">
                  <input type="hidden" name="tToPage"  id="tToPage" value="<%=strToPage%>">
                  <input type="button" value="增加" name="btnInsert" style="width: 72; height: 25" class=tx_button onMouseOver="tst(this,'blue','#ffffff')" onMouseOut="tst(this,'black','#e8e7fe')" onClick="btnRinsertS();">
                  &nbsp;&nbsp;&nbsp;&nbsp;
                  <input type="button" value="修改保存" name="JzB1" style="width: 72; height: 25" class=tx_button onMouseOver="tst(this,'blue','#ffffff')" onMouseOut="tst(this,'black','#e8e7fe')" onClick="btnModifyU();">
                  &nbsp;&nbsp;&nbsp;&nbsp;
                  <input type="reset" value="重置" name="JzB2" style="width: 72; height: 25" class=tx_button onMouseOver="tst(this,'blue','#ffffff')" onMouseOut="tst(this,'black','#e8e7fe')">
                  &nbsp;&nbsp;&nbsp;&nbsp;
                  <input type="button" value="返回" name="JzB4" style="width: 72; height: 25" class=tx_button onMouseOver="tst(this,'blue','#ffffff')" onMouseOut="tst(this,'black','#e8e7fe')" onClick="btnReturn();">
              </TD>
            </TR>
          </TBODY>
        </FORM>
        <% 
		mypage.dbConClose();
        %>
      </TABLE></TD>
  </TR>
  <FORM name="frmReturn" action="/btsm/nnlist_graph.jsp" method="post" target="_parent">
  </FORM>
</TABLE>
</BODY>
